home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
tex
/
installhd
< prev
next >
Wrap
Text File
|
1994-06-10
|
23KB
|
997 lines
; $VER: PasTeX 1.1 (20.5.94)
; Script to install PasTeX from CD-ROM
(complete 0)
(set old_level @user-level)
;
; strings
;
(set #ask-installdir
(cat "Please choose a directory, where PasTeX should be installed."
"(Note: I will create a directory 'TeX' in your directory.)"
))
(set #ask-installdir-help
(cat "You have to choose a directory, where the software will be copied."
"This directory must exist, please create one, if necessary. "
"E.g. if you choose Work: I will install TeX into Work:TeX"
))
(set #ask-instmask
(cat "Which parts of the CD TeX installation should be installed"
"on your harddisk?"
))
(set #ask-instmask-help
(cat "Choose which parts of the TeX installation you need.\n\n"
"PasTeX programs:\n Main TeX programs (initex, virtex, ShowDVI, DVIprint, SpecialHost, flib)\n\n"
"TeX utilities:\n Various usefull programs\n\n"
"TeX format files:\n plain.fmt, lplain.fmt ...\n\n"
"TeX macros:\n LaTeX, style files, ...\n\n"
"pk fonts:\n Fonts for different resolutions/printer\n\n"
"Metafont programs:\n programs to generate pk-fonts\n\n"
"Metafont font sources:\n sources of the pk-files"
))
(set #copy-pt-progs
(cat "Copy the core programs of PasTeX:"
))
(set #copy-tfm
(cat "Copy TFM-font files:"
))
(set #copy-rexx
(cat "Copy ARexx scripts:"
))
(set #copy-rexx-namestruc
(cat "Copy ARexx script 'namestruc' to REXX:"
))
(set #copy-config
(cat "Copy config-files:"
))
(set #ask-texprgmask
(cat "Which version of IniTeX/VirTeX would you like to install?"
))
(set #ask-texprgmask-help @askchoice-help
)
(set #copy-req-lib
(cat "Copy req.library:"
))
(set #copy-iff-lib
(cat "Copy iff.library:"
))
(set #help-req-lib
(cat "ShowDVI needs the req.library for the file and color requester."
))
(set #help-iff-lib
(cat "This library is needed for reading and writing IFF files."
))
(set #copy-tex-pool
(cat "Copy TeX.pool file:"
))
(set #copy-tex-norm-progs
(cat "Copy IniTeX/Virtex (small/68000):"
))
(set #copy-tex-big-progs
(cat "Copy IniTeX/Virtex (big/68000):\n"
"(You have to rename the programs)"
))
(set #copy-tex-20-progs
(cat "Copy IniTeX/Virtex (small/68020):\n"
"(You have to rename the programs)"
))
(set #copy-tex-big-20-progs
(cat "Copy IniTeX/Virtex (big/68020):\n"
"(You have to rename the programs)"
))
(set #ask-texutil
(cat "Which TeX utilities do you want to install:"
))
(set #ask-texutil-help @askoptions-help
)
(set #ask-formats
(cat "Which TeX format files do you want to install:"
))
(set #ask-formats-help @askoptions-help
)
(set #ask-macros
(cat "Which TeX macros (additional to plainTeX and LaTeX) do you want to install:"
))
(set #ask-macros-help @askoptions-help
)
(set #ask-resolutions
(cat "Which TeX pk-fonts do you want to install:"
))
(set #ask-resolutions-help @askoptions-help
)
(set #ask-preview
(cat "What set of preview-fonts do you want to install:"
))
(set #ask-preview-help @askchoice-help
)
(set #ask-180
(cat "What set of 180x180dpi fonts do you want to install:"
))
(set #ask-180-help @askchoice-help
)
(set #ask-300
(cat "What set of 300x300dpi fonts do you want to install:"
))
(set #ask-300-help @askchoice-help
)
(set #ask-360
(cat "What set of 360x360dpi fonts do you want to install:"
))
(set #ask-360-help @askchoice-help
)
(set #ask-600
(cat "What set of 600x600dpi fonts do you want to install:"
))
(set #ask-600-help @askchoice-help
)
(set #ask-pkfax
(cat "What set of 204x196dpi fax-fonts do you want to install:"
))
(set #ask-pkfax-help @askchoice-help
)
(set #ask-callmf
(cat "How would you like to have the automatical font generation:"
))
(set #ask-callmf-help
(cat "The PasTeX DVI-drivers supports a possibility to automatical call Metafont for"
"missing fonts. The ENV: variable CALLMF decide how Metafont will be called.\n\n"
"If there is no ENV:CALLMF, no fontcreation will be done.\n\n"
"If CALLMF points to MF:rexx/MakeBatch.rexx, a script will be created with an"
"entry for each missing font. If you call the script, all fonts which are missed"
"will be created.\n\n"
"If CALLMF points to MF:rexx/MakeTeXFont.rexx, each missing font will be created"
"immediatly. But this can take some time."
))
(set #startup-prompt
(cat "I have to add some commands to your S:User-Startup."
))
(set #startup-help
(cat "I have to add some commands to your S:User-Startup.\n\n"
"PasTeX needs some assigns to work:\n"
"TeX: root directory of the TeX installation.\n"
"MF: root directory of Metafont.\n"
"PKVol: assignment to the pk-font directories of the\n"
" CD-ROM. Needed for font-caching\n\n"
"Two path components are added too:\n"
"TeX:bin for the normal TeX programs/utilities\n"
"MF:bin for the Metafont programs."
))
;--------------------------------------------------------
;
; copyfonts procedure
;
(procedure copyfonts
(makedir pkdestdir)
(set fntlst "(cmbx10|cmbx5|cmbx7|cmcsc10|cmex10|cmmi10|cmmi5|cmmi7|cmr10|cmr5|cmr7|cmsl10|cmss10|cmssbx10|cmssi10|cmsy10|cmsy5|cmsy7|cmti10|cmtt10)")
(if (= pkcopyopt 1)
( ; then
; small subset
(set fntpat (cat fntlst ".#?"))
)
( ; else
; all fonts (or no fonts at all!)
(set fntpat "#?")
)
)
(if (<> pkcopyopt 0)
( ; then
; there are fonts to copy
(foreach pksourcedir pkpat
(if (= @each-type 2)
( ; then directory
(copyfiles (source (tackon pksourcedir @each-name))
(dest (tackon pkdestdir @each-name))
(pattern fntpat))
)
)
)
)
)
)
;--------------------------------------------------------
;--------------------------------------------------------
;--------------------------------------------------------
(set sourcedir (pathonly @icon))
(set target (askdir (prompt #ask-installdir)
(help #ask-installdir-help)
(default "Work:")
)
)
(set @default-dest (tackon target "TeX"))
(set texbindir (tackon @default-dest "bin"))
(set formatdir (tackon @default-dest "formats"))
(set macdir (tackon @default-dest "macros"))
(set pkdir (tackon @default-dest "pk"))
(set mfdir (tackon @default-dest "mf"))
(set mfbindir (tackon mfdir "bin"))
(makedir @default-dest (infos))
;
; ---------------------------------------------------------------------------
;
; Welche Pakete sollen installiert werden?
;
; ---------------------------------------------------------------------------
;
(if (>= @user-level 1)
(set instmask (askoptions (choices "PasTeX programs"
"TeX utilities"
"TeX format files"
"TeX macros"
"pk-fonts"
"Metafont programs"
"Metafont font sources"
)
(prompt #ask-instmask)
(help #ask-instmask-help)
(default 31)
)
)
(set instmask 31)
)
;
; ---------------------------------------------------------------------------
;
; Nun fuer alle zu installierenden Pakete diverse Fragen stellen
;
; ---------------------------------------------------------------------------
;
;------PasTeX prg install----------
(if (IN instmask 0)
( ; then
(if (>= @user-level 1)
((set texprgmask (askoptions (choices "initex/virtex"
"initex/virtex big-version"
"initex/virtex 020-version"
"initex/virtex big-020-version"
)
(prompt #ask-texprgmask)
(help #ask-texprgmask-help)
(default 1)
)
))
((set texprgmask 1)
))
)
( ; else
(set texprgmask 0)
)
)
;------Utilities-------------------
(if (IN instmask 1)
( ; then
(user 2)
(set texutilmask (askoptions (prompt #ask-texutil)
(help #ask-texutil-help)
(choices "bibtex"
"bm2font"
"c++2latex"
"dvi2tty"
"dvidvi"
"dviLJ2p"
"dvips"
"dvips (68020 version)"
"dvitype"
"lacheck (LaTeX check)"
"fig / fig2dev / TransFig"
"makeindex"
"pbmtopk / pktopbm"
)
(default 0)
)
)
(user old_level)
)
( ; else
(set texutilmask 0)
)
)
;------TeX formats------------------
(if (IN instmask 2)
( ; then
(user 2)
(set formatmask (askoptions (prompt #ask-formats)
(help #ask-formats-help)
(choices "plain"
"gplain (german)"
"lplain (LaTeX)"
"glplain (LaTeX german)"
"latex2e (LaTeX2e english+german)"
)
(default 5)
)
)
(if (IN formatmask 4)
(message "You have choosen the LaTeX2e format files.\n\n"
"In order to use these files, you also have to install the LaTeX2e macros!"
)
)
(user old_level)
)
( ; else
(set formatmask 0)
)
)
;------TeX macros------------------
(if (IN instmask 3)
( ; then
(user 2)
(set macdef 0)
(if (IN formatmask 4)
(set macdef 1)
)
(set macros (askoptions (prompt #ask-macros)
(help #ask-macros-help)
(choices "all LaTeX2e macros"
"a4 (old LaTeX)"
"dinbrief"
"epic"
"eepic"
"script"
"subeqn"
"supertab"
"array"
"docstrip"
"ftnright"
"multicol"
"nfss"
"theorem"
"verbatim"
)
(default macdef)
)
)
(if (IN macros 0)
(message "You have choosen the LaTeX2e macro files.\n\n"
"In order to use these files, you have to change the TeX configuration."
"See the difference between TeX:config/TeX.cnf and TeX.cnf.latex2e.\n\n"
"You have to use the other TEXINPUTS line.\n\n"
"If you have done this, you can call LaTeX2e with:\n"
"virtex &latex2e\n\n\n"
"If you get problems with the TeX capacity, use bigvirtex."
)
)
(user old_level)
)
( ; else
(set macros 0)
)
)
;------pk-fonts--------------------
(if (IN instmask 4)
(
(user 2)
(set resomask (askoptions (prompt #ask-resolutions)
(help #ask-resolutions-help)
(choices "preview"
"180x180 dpi (e.g. NEC P6 draft)"
"300x300 dpi (e.g. HP DeskJet)"
"360x360 dpi (e.g. NEC P6 high quality)"
"600x600 dpi (e.g. LaserJet 4)"
"204x196 dpi (FAX resolution)"
)
(default 1)
)
)
(user old_level)
; preview fonts
(if (IN resomask 0)
( ; then
(set pkprev (askchoice (prompt #ask-preview)
(help #ask-preview-help)
(choices "none (use font caching)"
"only a small subset (use font caching)"
"all fonts (of this CD)"
)
(default 0)
)
)
)
)
; 180x180
(if (IN resomask 1)
( ; then
(set pk180 (askchoice (prompt #ask-180)
(help #ask-180-help)
(choices "none (use font caching)"
"only a small subset (use font caching)"
"all fonts (of this CD)"
)
(default 0)
)
)
)
)
; 300x300
(if (IN resomask 2)
( ; then
(set pk300 (askchoice (prompt #ask-300)
(help #ask-300-help)
(choices "none (use font caching)"
"only a small subset (use font caching)"
"all fonts (of this CD)"
)
(default 0)
)
)
)
)
; 360x360
(if (IN resomask 3)
( ; then
(set pk360 (askchoice (prompt #ask-360)
(help #ask-360-help)
(choices "none (use font caching)"
"only a small subset (use font caching)"
"all fonts (of this CD)"
)
(default 0)
)
)
)
)
; 600x600
(if (IN resomask 4)
( ; then
(set pk300 (askchoice (prompt #ask-600)
(help #ask-600-help)
(choices "none (use font caching)"
"only a small subset (use font caching)"
"all fonts (of this CD)"
)
(default 0)
)
)
)
)
; 204x196
(if (IN resomask 5)
( ; then
(set pkfax (askchoice (prompt #ask-pkfax)
(help #ask-pkfax-help)
(choices "none (use font caching)"
"only a small subset (use font caching)"
"all fonts (of this CD)"
)
(default 0)
)
)
)
)
)
)
;------mf progs--------------------
(if (IN instmask 5)
( ; then
(set callmf (askchoice (prompt #ask-callmf)
(help #ask-callmf-help)
(choices "no automatical font creation"
"create a batchfile for font creation"
"create missing fonts immediately"
)
(default 2)
)
)
)
)
;------mf fnt source---------------
; hier gibt's nichts zu fragen
;
; ---------------------------------------------------------------------------
;
; Nun die Pakete wirklich installieren.
; Hier nun keine User-Aktionen!
;
; ---------------------------------------------------------------------------
;
;------PasTeX prg install----------
(if (IN instmask 0)
(
(set texbindir (tackon @default-dest "bin"))
(copyfiles (prompt #copy-pt-progs)
(source (tackon sourcedir "bin"))
(choices "ShowDVI" "DVIprint" "Flib" "SpecialHost" "PToFront")
(dest texbindir)
(infos)
)
(copyfiles (prompt #copy-tfm)
(source (tackon sourcedir "fonts"))
(dest (tackon @default-dest "fonts"))
(all)
)
(copyfiles (prompt #copy-rexx)
(source (tackon sourcedir "rexx"))
(dest (tackon @default-dest "rexx"))
(all)
)
(copyfiles (prompt #copy-rexx-namestruc)
(source (tackon sourcedir "rexx"))
(dest "rexx:")
(choices "namestruc")
)
(copyfiles (prompt #copy-config)
(source (tackon sourcedir "config"))
(dest (tackon @default-dest "config"))
(all)
)
(copylib (prompt #copy-req-lib)
(help #help-req-lib)
(source (tackon (tackon sourcedir "libs") "req.library"))
(dest "libs:")
(optional "nofail")
(confirm)
)
(copylib (prompt #copy-iff-lib)
(help #help-req-lib)
(source (tackon (tackon sourcedir "libs") "iff.library"))
(dest "libs:")
(optional "nofail")
(confirm)
)
(if (<> texprgmask 0)
(
(copyfiles (prompt #copy-tex-pool)
(source sourcedir)
(dest @default-dest)
(choices "TeX.pool")
)
)
)
(if (IN texprgmask 0)
(
(copyfiles (prompt #copy-tex-norm-progs)
(source (tackon sourcedir "bin"))
(choices "IniTeX" "VirTeX")
(dest texbindir)
(infos)
)
))
(if (IN texprgmask 1)
(
(copyfiles (prompt #copy-tex-big-progs)
(source (tackon sourcedir "bin"))
(choices "BigIniTeX" "BigVirTeX")
(dest texbindir)
(infos)
(optional)
)
))
(if (IN texprgmask 2)
(
(copyfiles (prompt #copy-tex-20-progs)
(source (tackon sourcedir "bin"))
(choices "IniTeX20" "VirTeX20")
(dest texbindir)
(infos)
(optional)
)
))
(if (IN texprgmask 3)
(
(copyfiles (prompt #copy-tex-big-20-progs)
(source (tackon sourcedir "bin"))
(choices "BigIniTeX20" "BigVirTeX20")
(dest texbindir)
(infos)
(optional)
)
))
)
)
(complete 4)
;------Utilities-------------------
(set n 0)
(set texutilpat "(%")
(while (set texutil (select n "bibtex"
"bm2font"
"c++2latex"
"dvitty"
"dvidvi"
"dviLJ2p"
"dvips"
"dvips20"
"dvitype"
"lacheck"
"fig|fig2dev|transfig"
"makeindex"
"pbmtopk|pktopbm"
""
)
)
(
(if (IN texutilmask n)
(
(set texutilpat (cat texutilpat "|" texutil))
))
(set n (+ n 1))
))
(copyfiles (source (tackon sourcedir "bin"))
(dest texbindir)
(pattern (cat texutilpat ")")))
(if (OR (IN texutilmask 6) (IN texutilmask 7))
(
(copyfiles (source (tackon sourcedir "ps"))
(dest (tackon @default-dest "ps"))
(all))
)
)
(complete 7)
;------TeX formats------------------
(if (<> formatmask 0)
( ; then
(set n 0)
(set formatpat "(%")
(while (set format (select n "plain.fmt|plain.log"
"gplain.fmt|gplain.log"
"lplain.fmt|lplain.log"
"glplain.fmt|glplain.log"
"latex2e.fmt|latex2e.log"
""
)
)
(
(if (IN formatmask n)
(
(set formatpat (cat formatpat "|" format))
))
(set n (+ n 1))
))
(makedir formatdir)
(copyfiles (source (tackon sourcedir "formats"))
(dest formatdir)
(pattern (cat formatpat ")")))
)
)
(complete 10)
;------TeX macros------------------
(if (IN instmask 3)
(
(set lamacdir (tackon macdir "latex"))
(set mimacdir (tackon macdir "misc"))
(makedir macdir (infos))
(makedir lamacdir (infos))
(makedir mimacdir (infos))
(makedir (tackon macdir "distribs"))
; sollen die LaTeX2e Makrs installiert werden?
(if (IN macros 0)
(
(makedir (tackon macdir "latex2e") (infos))
(makedir (tackon macdir "latex2e/inputs") (infos))
)
)
; erstmal die normalen Macros kopieren, die immer kopiert werden
(copyfiles (source (tackon sourcedir "macros"))
(dest macdir)
(pattern "#?.(tex|sty|one|two|hyphen)"))
(copyfiles (source (tackon (tackon sourcedir "macros") "misc"))
(dest mimacdir)
(all))
(copyfiles (source (tackon (tackon sourcedir "macros") "hyphenation"))
(dest (tackon macdir "hyphenation"))
(all))
(copyfiles (source (tackon (tackon (tackon sourcedir "macros") "latex") "general"))
(dest (tackon lamacdir "general"))
(all))
(copyfiles (source (tackon (tackon (tackon sourcedir "macros") "latex") "sty"))
(dest (tackon lamacdir "sty"))
(all))
(set n 0)
(while (set macrodir (select n "latex2e/inputs"
"a4"
"dinbrief"
"epic"
"eepic"
"script"
"subeqn"
"supertab"
"distribs/array"
"distribs/doc"
"distribs/ftnright"
"distribs/multicol"
"distribs/nfss"
"distribs/theorem"
"distribs/verbatim"
""
)
)
(
(if (IN macros n)
(
(copyfiles (source (tackon (tackon sourcedir "macros") macrodir))
(dest (tackon macdir macrodir)
(all))
)
)
)
(set n (+ n 1))
))
)
)
(complete 30)
;------pk-fonts--------------------
(if (IN instmask 4)
( ; then
(set pkdir (tackon @default-dest "pk"))
(makedir pkdir)
; preview fonts
(if (IN resomask 0)
( ; then
(set pkdestdir pkdir)
(set pksourcedir (tackon sourcedir "pk"))
(set pkcopyopt pkprev)
(set pkpat "#[0-9]")
(copyfonts)
)
)
; 180 fonts
(if (IN resomask 1)
( ; then
(set pkdestdir (tackon pkdir "180x180"))
(set pksourcedir (tackon sourcedir "pk/180x180"))
(set pkcopyopt pk180)
(set pkpat "#[0-9]")
(copyfonts)
)
)
; 300 fonts
(if (IN resomask 2)
( ; then
(set pkdestdir (tackon pkdir "300x300"))
(set pksourcedir (tackon sourcedir "pk/300x300"))
(set pkcopyopt pk300)
(set pkpat "#[0-9]")
(copyfonts)
)
)
; 360 fonts
(if (IN resomask 3)
( ; then
(set pkdestdir (tackon pkdir "360x360"))
(set pksourcedir (tackon sourcedir "pk/360x360"))
(set pkcopyopt pk360)
(set pkpat "#[0-9]")
(copyfonts)
)
)
; 600 fonts
(if (IN resomask 2)
( ; then
(set pkdestdir (tackon pkdir "600x600"))
(set pksourcedir (tackon sourcedir "pk/600x600"))
(set pkcopyopt pk600)
(set pkpat "#[0-9]")
(copyfonts)
)
)
; 204x196 fonts
(if (IN resomask 3)
( ; then
(set pkdestdir (tackon pkdir "204x196"))
(set pksourcedir (tackon sourcedir "pk/204x196"))
(set pkcopyopt pkfax)
(set pkpat "#[0-9]")
(copyfonts)
)
)
)
)
(complete 80)
;------mf progs--------------------
(if (IN instmask 5)
( ; then
(makedir mfdir (infos))
(copyfiles (source (tackon sourcedir "mf"))
(dest mfdir)
(pattern "(bases|bin|config|doc|rexx)"))
(if (= callmf 1)
( ; then batch
(copyfiles (source (tackon sourcedir "mf/ENV"))
(dest "ENV:")
(choices "CALLMF-batch")
(newname "CALLMF"))
(copyfiles (source (tackon sourcedir "mf/ENV"))
(dest "ENVARC:")
(choices "CALLMF-batch")
(newname "CALLMF"))
)
)
(if (= callmf 2)
( ; then immediately
(copyfiles (source (tackon sourcedir "mf/ENV"))
(dest "ENV:")
(choices "CALLMF"))
(copyfiles (source (tackon sourcedir "mf/ENV"))
(dest "ENVARC:")
(choices "CALLMF"))
)
)
)
)
(complete 85)
;------mf fnt source---------------
(if (IN instmask 6)
( ; then
(makedir mfdir (infos))
(copyfiles (source (tackon sourcedir "mf/inputs"))
(dest (tackon mfdir "inputs"))
(all))
)
)
(complete 99)
(startup @app-name (prompt #startup-prompt)
(help #startup-help)
(command (cat "assign TeX: " @default-dest "\n"))
(command (cat "assign MF: " mfdir "\n"))
(command (cat "assign PKVol: " (tackon sourcedir "pk") " "
(tackon sourcedir "pk/180x180") " "
(tackon sourcedir "pk/300x300") " "
(tackon sourcedir "pk/360x360") " "
(tackon sourcedir "pk/600x600") " "
(tackon sourcedir "pk/204x196") "\n"))
(command "path TeX:bin MF:bin add")
)
(complete 100)
(exit)